home *** CD-ROM | disk | FTP | other *** search
/ Pascal Super Library / Pascal Super Library (CW International)(1997).bin / TURB_VIS / TVCC / TVCC.INT < prev    next >
Text File  |  1992-12-31  |  3KB  |  97 lines

  1. {*******************************************************}
  2. {                                                       }
  3. {       Turbo Pascal Version 7.0                        }
  4. {       Turbo Vision Unit                               }
  5. {       Alternate Custom Controls Version 1.1           }
  6. {                                                       }
  7. {       Copyright (c) 1992 Borland International        }
  8. {       Copyright (c) 1992 Castle Computer Services     }
  9. {                                                       }
  10. {       Admendments                                     }
  11. {       Version 1.1  - Fix to incorrect palette         }
  12. {                      setting in                       }
  13. {                      TTVCCApplication.Getpalette      }
  14. {                      function.                        }
  15. {                                                       }
  16. {*******************************************************}
  17.  
  18. Unit TVCC;
  19. {$O+,F+,X+,I-,S-}
  20. Interface
  21. Uses
  22.   Objects, Views, Drivers, Dialogs, App;
  23.  
  24. Const
  25.   cTVCCAppColor = cAppColor +
  26.     #$78#$7F#$70#$70#$0F#$70#$70#$7F#$7F#$78#$7F#$70#$70#$7F#$70#$70 +
  27.     #$07#$70#$70#$07#$70#$0F#$78#$70#$0F#$70#$7F#$07#$70#$70#$78#$00;
  28.  
  29.  cTVCCAppBlackWhite = cAppBlackWhite +
  30.     #$78#$7F#$70#$70#$0F#$70#$70#$7F#$7F#$78#$7F#$70#$70#$7F#$70#$70 +
  31.     #$07#$70#$70#$07#$70#$0F#$78#$70#$0F#$70#$7F#$07#$70#$70#$78#$00;
  32.  
  33.  cTVCCAppMonoChrome = cAppMonoChrome +
  34.     #$70#$70#$70#$07#$07#$70#$70#$70#$0F#$07#$07#$0F#$70#$0F#$70#$07 +
  35.     #$0F#$0F#$07#$70#$07#$07#$70#$07#$07#$07#$70#$0F#$07#$07#$70#$00;
  36.  
  37.  cTVCCDialog =
  38.     #$80#$81#$82#$83#$84#$85#$86#$87#$88#$89#$8A#$8B#$8C#$8D#$8E#$8F +
  39.     #$90#$91#$92#$93#$94#$95#$96#$97#$98#$99#$9A#$9B#$9C#$9D#$9E#$9F;
  40.  
  41.    cTVCCFrameLine =
  42.      #11#12;
  43.  
  44. Type
  45.   PFrameLine = ^TFrameLine;
  46.   TFrameLine = object(TView)
  47.     Procedure Draw; virtual;
  48.     Function GetPalette : PPalette; virtual;
  49.   end;
  50.  
  51.   PTVCCButton = ^TTVCCButton;
  52.   TTVCCButton = object(TButton)
  53.     Constructor Init(var R : TRect; ATitle : TTitleStr; ACommand : Word; AFlags : Byte);
  54.     Procedure DrawNewState(Down: Boolean);
  55.     Procedure HandleEvent(var Event : TEvent); virtual;
  56.     Procedure Draw; virtual;
  57.   end;
  58.  
  59.   PTVCCDialog = ^TTVCCDialog;
  60.   TTVCCDialog = object(TDialog)
  61.     Constructor Load(var S : TStream);
  62.     Procedure Insert(P : PView); virtual;
  63.     Function GetPalette : PPalette; virtual;
  64.   end;
  65.  
  66.   PTVCCApplication = ^TTVCCApplication;
  67.   TTVCCApplication = object(TApplication)
  68.     Constructor Init;
  69.     Function GetPalette : PPalette; virtual;
  70.   end;
  71.  
  72. Const
  73.   RFrameLine : TStreamRec = (
  74.     ObjType : 2000;
  75.     VmtLink : Ofs(Typeof(TFrameLine)^);
  76.     Load : @TFrameLine.Load;
  77.     Store : @TFrameLine.Store
  78.   );
  79.  
  80.   RTVCCButton : TStreamRec = (
  81.     ObjType : 2001;
  82.     VmtLink : Ofs(TypeOf(TTVCCButton)^);
  83.     Load : @TTVCCButton.Load;
  84.     Store : @TTVCCButton.Store
  85.   );
  86.  
  87.   RTVCCDialog : TStreamRec = (
  88.     ObjType : 2002;
  89.     VmtLink : Ofs(TypeOf(TTVCCDialog)^);
  90.     Load : @TTVCCDialog.Load;
  91.     Store : @TTVCCDialog.Store
  92.   );
  93.  
  94. Procedure RegisterTVCC;
  95.  
  96. Implementation
  97.